#include"button.h"
#include <stdio.h>

Button::Button()
{
    BUTTON_LEAVE = 0;
    BUTTON_ENTER = 1;
    BUTTON_PRESS = 2;
    statue = BUTTON_LEAVE;
    setFocusPolicy(Qt::NoFocus);

    setFixedSize(30,30);
}

void Button::set_btn_style(bool close_btn)
{
    this->is_close_btn=close_btn;
//    if(this->is_close_btn==false)
//    {
//        setStyleSheet("QPushButton{background-color:#ffffff;border-radius:4px;image: url(:/qmfile/res/mini_btn1.png);}"
//                      "QPushButton:hover{background-color:#3d6be5;border-radius:4px;image: url(:/qmfile/res/mini_btn2.png);}"
//                      "QPushButton:pressed{background-color:#3257ea;border-radius:4px;image: url(:/qmfile/res/mini_btn2.png);}");
//    }
//    else
//    {
//        setStyleSheet("QPushButton{background-color:#ffffff;border-radius:4px;image: url(:/qmfile/res/close_btn1.png);}"
//                      "QPushButton:hover{background-color:#f86457;border-radius:4px;image: url(:/qmfile/res/close_btn2.png);}"
//                      "QPushButton:pressed{background-color:#e44c50;border-radius:4px;image: url(:/qmfile/res/close_btn2.png);}");
//    }
}


Button::~Button()
{
    delete this;
}
